<extend name="extends/extend"/>
<block name="title">NETWWS-CMS - LOGIN</block>
<block name="content">
<div class="middle-box loginscreen  animated fadeInDown" style="margin-top: 10%">
    <h2 class="text-center">LOGIN TO NETWWS-CMS MANGE</h2>
    <form class="m-t" role="form" action="" method="post" id="loginForm">
        <div class="form-group">
            <input type="text" id="username" name="username" class="form-control" placeholder="用户名">
        </div>
        <div class="form-group">
            <input type="password" id="password" name="password" class="form-control" placeholder="密码" >
        </div>
        <div class="form-group">
            <input type="text" name="captcha" id="captcha" class="form-control" placeholder="验证码">
        </div>
        <div class="form-group">
            <img src="/captcha.html" onclick="this.src = this.src+'?'+Math.random()" alt="验证码" >
        </div>
        {:token()}
        <button type="submit" class="btn btn-primary block full-width m-b">登 录</button>
        <p class="text-muted text-center">
            <a href="login.html#"><small>忘记密码了？</small></a>
        </p>
    </form>
</div>
</block>
<block name="script">
    <!--表单验证 插件-->
<script src="__admin__/js/plugins/validate/jquery.validate.min.js"></script>
<script src="__admin__/js/plugins/validate/messages_zh.min.js"></script>
<script>
    $(document).ready(function(){
        $('#loginForm').validate({
            submitHandler:function(form) {
                form.submit();
            },
            highlight: function(e) {
                $(e).closest(".form-group").removeClass("has-success").addClass("has-error")
            },
            success: function(e) {
                e.closest(".form-group").removeClass("has-error").addClass("has-success")
            },
            errorClass: "help-block m-b-none",
            rules:{
                username:{required:true,maxlength:18,minlength:3},
                password:{required:true,maxlength:18,minlength:3},
                captcha:{required:true,minlength:5,maxlength:5},
            }
        });
    });
</script>
</block>
</body>
</html>
